import type { SiteConfig } from "./types/type";
import { defineStore } from "pinia";
import { Names } from "../store/store-namespace";

export const useSiteConfig = defineStore(Names.siteConfig, {
  state: (): SiteConfig => {
    return {
      site_name: "运营看板系统", //站点名称
      record_number: "",
      version: "", //版本
      cdn_url: "", //cdn地址
      api_url: "", //api地址
      upload: {
        mode: "local",
        maxsize: 0,
        mimetype: "",
        savename: "",
      },
    };
  },
  actions: {
    dataFill(state: SiteConfig) {
      this.$state = state;
    },
  },
});
